from sanic import Blueprint
from sanic.response import json
from ..model import User

bp = Blueprint(__name__, url_prefix='/user')

@bp.route("/")
async def root(request):
    user = await User.create(name="New User")
    res = await User.all()
    print(res)
    return json({"msg": "hi login.py"})

@bp.get("/quit")
async def quit(request):
    return json({"msg": "quit"})